home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / hsrc_117.zip / MISCSTUF.C < prev    next >
C/C++ Source or Header  |  1990-11-08  |  1KB  |  81 lines

  1. #include "msgg.h"
  2. #include "twindow.h"
  3. #include "keys.h"
  4. #include "headedit.h"
  5.  
  6.  
  7.  
  8. void pascal strip_blanklines (char *hold) {
  9.  
  10.     char *p;
  11.  
  12.     p=&hold[strlen(hold)-1];
  13.     while(*p=='\r' && p>hold) {
  14.         *p=0;
  15.         p--;
  16.     }
  17. }
  18.  
  19.  
  20. void pascal get_rid () {
  21.  
  22.     char temp[86];
  23.  
  24.      strcpy(temp,"MSGTMP");
  25.      unlink(temp);
  26.      strcat(temp,".INF");
  27.      unlink(temp);
  28. }
  29.  
  30.  
  31.  
  32. void pascal print_clock (void) {
  33.  
  34.     struct time dos_time;
  35.     static struct time hold_time;
  36.     char temp;
  37.  
  38.     if(noclock) return;
  39.     gettime(&dos_time);
  40.     if (dos_time.ti_sec==hold_time.ti_sec) return;
  41.     gettime(&hold_time);
  42.     temp=current_color;
  43.     current_color=7*16;
  44.     dputs(maxx-9,maxy,saytime(&dos_time));
  45.     current_color=temp;
  46. }
  47.  
  48.  
  49.  
  50. void pascal clrr (void) {
  51.     fputs("\x1b[2J",stdout);
  52. }
  53.  
  54.  
  55. void pascal bell (void) {
  56.     if(!nobell)putchar('\07');
  57. }
  58.  
  59.  
  60.  
  61. void pascal update_read (void) {
  62.  
  63.     msg.attr = msg.attr | MSGREAD;
  64.     msg.times++;
  65.     put_mess();
  66.  
  67. }
  68.  
  69.  
  70. void pascal cls (int x,int y,int x1,int y1,int attr) {
  71.  
  72.     char temp;
  73.  
  74.     temp=current_color;
  75.     if(!attr)attr=7;
  76.     current_color=(char)attr;
  77.     dclrwnd(x,y,x1,y1); /* From pd direct screen module */
  78.     current_color=temp;
  79. }
  80.  
  81.